<?php
/**
 * Basic example to show how the class loader may be used.
 * 
 * @author  Frank Kleine <frank.kleine@schlund.de>
 */
/**
 * Basic example to show how the class loader may be used.
 * 
 * @package     XJConf
 * @subpackage  examples
 */
class ClassLoader implements XJConfClassLoader
{
    /**
     * load the file with the given class
     *
     * @param  string  $fqClassName  the full qualified class name
     */
    public function loadClass($fqClassName)
    {
        require_once str_replace('::', '/', $fqClassName) . '.php';
    }
    
    /**
     * returns short class name
     *
     * @param  string  $fqClassName  the full qualified class name
     */
    public function getType($fqClassName)
    {
        $className = explode('::', $fqClassName);
        return $className[count($className) - 1];
    }
}
?>